#include <iostream>

using namespace std;

const int N = 1e5 + 10;
int a[N];
int n, k;

int calc(int x)
{
	int ret = 0;
	for(int i = 1; i <= n; i++) ret += a[i] / x;
	return ret;
}

int main()
{
	int maxlen = 0;
	cin >> n >> k;
	for(int i = 1; i <= n; i++) 
	{
		cin >> a[i];
		maxlen = max(maxlen, a[i]);
	}
	int l = 0, r = maxlen;
	while(l < r)
	{
		int mid = (l + r + 1) >> 1;
		int target = calc(mid);
		if(target >= k) l = mid;
		else r = mid - 1; 
	}
	cout << l << endl;
	
	return 0;
}
